<?php
	ini_set("include_path", ini_get("include_path") . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] . "/Common");

	include_once("Accounts.config.php");	
	include_once('Application/ApplicationTemplate.php');

	//start buffering the output
	ob_start();	
	
	$Template = new ApplicationTemplate("/Accounts/templates/template.htm");

	//set up the application server to push the PHP into the template
	include_once("Application/AppServer.php");
	$AppServer = new AppServer();
	
	switch($_GET['action'])
	{
		case 'new':
			$Template->printTemplate($AppServer,'new.php');
			break;
		case 'newProcessForm':
			include('newProcessForm.php');
			break;
		case 'newSuccess':
			$Template->printTemplate($AppServer,'newSuccess.php');
			break;
		case 'resetPassword':
			$Template->printTemplate($AppServer,'resetPassword.php');
			break;
		case 'resetPasswordProcessForm':
			include('resetPasswordProcessForm.php');
			break;
		case 'resendTemporaryPasswordEmail':
			include('resendTemporaryPasswordEmail.php');
			break;
		default:
			header("Location: /index.php");
			break;
	}

	//flush all buffered output to the browser and stop buffering
	ob_end_flush();
?>
 
 
